﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class Computer
    {

        public Computer(string brand)
        {
            this.brand = brand;
        }
        public string brand { get; set; }
        public void starting()
        {
            Console.WriteLine("电脑正在开机...");
        }
        public void end()
        {
            Console.WriteLine("电脑正在关机...");
        }
    }

    class Up: Computer, IUSB
    {
        public Up(string brand):base(brand)
        {
            
        }

        public void Read()
        {
            Console.WriteLine("{0}品牌的U盘在读取数据中...", this.brand);
        }

        public void Write()
        {
            Console.WriteLine("{0}品牌的U盘正在写入数据中...", this.brand);
        }
    }
    class HardDisk: Computer, IUSB
    {
        public HardDisk(string brand) : base(brand)
        {

        }

        public void Read()
        {
            Console.WriteLine("{0}品牌的硬盘在读取数据中...", this.brand);
        }

        public void Write()
        {
            Console.WriteLine("{0}品牌的硬盘正在写入数据中...", this.brand);
        }
    }


    interface IUSB
    {
        void Read();
        void Write();
    }
}
